<style>
    .table>thead:first-child>tr:first-child>th{border-bottom: 1px solid #ddd;font-size: 14px;text-align: center}
    .table tbody tr td{text-align:center;vertical-align: middle!important;}
    .site-default{list-style: none;margin:10px 0;vertical-align: middle;padding:0}
</style>
<include file="Public:header" />
<div class="row">
    <div class="col-sm-7 col-md-8 col-lg-9">
        <div class="panel modal-open f-site"  data-intro="此处查看站点配置" data-position="left">
            <div class="panel-heading">
                <span class="pagetitle">系统设置</span>
            </div>
            <div class="panel-body">
                <form class="cmxform form-horizontal adminex-form valid-form" method="post" action="{:U('update')}">
                    <?php 
                    	$config=unserialize($info['config']);//反序列化配置项
                     ?>
                    <div class="form-group ">
                        <label for="username" class="control-label col-sm-3">公司名称：</label>
                        <div class=" col-sm-6 col-lg-5">
                            <input  datatype="s3-26" class="form-control " value="<?php echo $info['title']; ?>" id="title" name="title" type="text">
                            <span class="help-block Validform_checktip">填写公司名称</span>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label for="username" class="control-label col-sm-3">联系人：</label>
                        <div class=" col-sm-6 col-lg-5">
                            <input  datatype="s2-10" class="form-control " value="<?php echo $config['contact']?$config['contact']:''; ?>" id="contact" name="contact" type="text">
                            <span class="help-block Validform_checktip">填写公司联系人</span>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label for="username" class="control-label col-sm-3">电话：</label>
                        <div class=" col-sm-6 col-lg-5">
                            <input  datatype="m" class="form-control " value="<?php echo $config['phone']?$config['phone']:''; ?>" id="phone" name="phone" type="tel">
                            <span class="help-block Validform_checktip">填写联系人电话/手机号码</span>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label for="username" class="control-label col-sm-3">行业：</label>
                        <div class=" col-sm-6 col-lg-5">
                            <!--<input  datatype="s3-18" class="form-control " value="<?php echo $config['industry']?$config['industry']:''; ?>" id="industry" name="industry" type="text">-->
                            <select datatype="*" class="form-control" id="industry" name="industry">
                            	<?php $industryList=['教育','建筑业','金融业','采矿业','房地产业','批发和零售业','住宿和餐饮业','信息技术服务业','租赁和商务服务业','农、林、牧、渔业','文化、体育和娱乐业','科学研究和技术服务业','交通运输、仓储和邮政业','电力、热力、燃气及水生产和供应业']; ?>
                            	<volist name="industryList" id="vo">
                                	<option value="{$i}" <?php if($i==$config['industry']){echo('selected="selected"');} ?>>{$vo}</option>
                                </volist>
                            </select>
                            <span class="help-block Validform_checktip">选择公司所在行业</span>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label for="username" class="control-label col-sm-3">地址：</label>
                        <div class=" col-sm-6 col-lg-5">
                            <input  datatype="s3-30" class="form-control " value="<?php echo $config['address']?$config['address']:''; ?>" id="address" name="address" type="text">
                            <span class="help-block Validform_checktip">填写公司地址</span>
                        </div>
                    </div>
                    
                    <div class="form-group ">
                        <label for="username" class="control-label col-sm-3">用户数：</label>
                        <div class=" col-sm-6 col-lg-5">
                             <div class="progress progress-striped">
                             	<?php $num=$nowNum/$info['maxNum']*100; $num=$num>100?100:$num; ?>
                                <div style="width: {$num}%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="{$num}" role="progressbar" class="progress-bar progress-bar-<?php echo($nowNum>=$info['maxNum']?'danger':'success'); ?>">
                                    <span class="">{$nowNum}人</span>
                                </div>
                             </div>
                            <span class="help-block Validform_checktip">公司实际用户数量为{$nowNum}人，站点当前允许用户数量为{$info['maxNum']}</span>
                        </div>
                    </div>
                    <!--<div class="form-group ">
                        <label for="username" class="control-label col-sm-3">登录方式：</label>
                        <div class=" col-sm-6 col-lg-5 icheck minimal ">
                            <div class="radio square-red">
                            	<label><input <?php echo $info['is_wxLogin']==0?'checked':''; ?> type="radio" value="0" name="is_wxLogin">帐号登录</label>
                            </div>
                            <div class="radio square-red">
                            	<label><input <?php echo $info['is_wxLogin']==1?'checked':''; ?> type="radio" value="1" name="is_wxLogin">微信登录</label>
                            </div>
                        </div>
                    </div>-->
                    
                    
                    <div class="row">
                        <div class="col-sm-offset-3 col-sm-6 col-lg-5">
                            <button class="btn btn-success btn-block" type="submit">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="panel modal-open f-inteType" style="display:none;">
            <div class="panel-heading">
                <span class="pagetitle">积分类型配置</span>
            </div>
            <div class="panel-body directory-info-row">
                <table class="display table table-bordered table-hover table-striped">
                    <thead>
                        <tr>
                            <th>名称</th>
                            <th>初始化积分</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <volist name="list_inteType" id="vo">
                            <tr>
                                <td>{$vo.remark}</td>
                                <td>{$vo.initVal}</td>
                                <td>
                                	<ul class="site-default">
                                        <li>
                                            <!--<a onClick="_openWindow('{:U('Integral_type/edit',['id'=>$vo['id']])}',500,'修改积分','保存',null,'')" data-placement="top" data-toggle="tooltip" class="tooltips" href="javascript:void(0);" data-original-title="修改积分类型"  data-position="bottom" data-intro="修改积分类型" >-->
                                                <!--<i class="fa icon-edit"></i>-->
                                            <!--</a>-->
                                            <button class="btn btn-success " type="button"  data-id="{$vo.id}" href="javascript:void(0);"  onClick="_openWindow('{:U('Integral_type/edit',['id'=>$vo['id']])}',500,'修改','保存',null,'')">修改</button>
                                        </li>
                                    </ul>
                                </td>
                            </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="col-sm-5 col-md-4 col-lg-3 states-info">
        <div onClick="javascript:void(0);" data-obj=".f-site" class="panel green-bg f-toggle" style="cursor:pointer;">
            <div class="panel-body">
                <div class="row">
                    <div class="col-xs-4">
                        <i class="fa icon-cogs"></i>
                    </div>
                    <div class="col-xs-8">
                        <h4>基本设置</h4>
                        <span class="state-title">对系统的基本设置进行修改</span>
                    </div>
                </div>
            </div>
        </div>
        <div onClick="javascript:void(0);" data-obj=".f-inteType" class="panel green-bg f-toggle" style="cursor:pointer;">
            <div class="panel-body">
                <div class="row">
                    <div class="col-xs-4">
                        <i class="fa icon-star-half-o"></i>
                    </div>
                    <div class="col-xs-8">
                        <h4>积分设置</h4>
                        <span class="state-title">对系统的积分类型进行修改</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix">
    </div>
</div>
<include file="Public:script" />
<script type="text/javascript">
//切换
$(".f-toggle").click(function(e) {
    $($(this).attr('data-obj')).siblings(".panel").slideUp();
	$($(this).attr('data-obj')).slideDown();
});
//表单验证
$(".valid-form").Validform({
	tiptype:function(msg,o,cssctl){
		if(!o.obj.is("form")){
			var objtip=o.obj.siblings(".Validform_checktip");
			cssctl(objtip,o.type);
			objtip.text(msg);
		}else{
			var objtip=o.obj.find("#msgdemo");
			cssctl(objtip,o.type);
			objtip.text(msg);
		}
	},
	ajaxPost:true,
	callback:function(data){
		if(data.status){
			$.ThinkBox.success('保存成功',{'delayClose':1000,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
		}else{
			$.ThinkBox.error(data.info,{'delayClose':1000,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});	
		}
	}
});

</script>
</body></html>